package cn.kinoko.feign;

import cn.kinoko.model.ai.mit.resp.MITPrintImgResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;

/**
 * @author kinoko
 * @date 2024/8/13 10:40
 */
@FeignClient(name = "mit-web", url = "${ai.mit.web-endpoint:http://127.0.0.1:5002}")
public interface MITWebClient {

    @PostMapping(value = "/run", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    MITPrintImgResp run(@RequestPart(value = "url") String url,
                        @RequestPart(value = "detector") String detector,
                        @RequestPart(value = "direction") String direction,
                        @RequestPart(value = "translator") String translator);

}
